﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="FShoppingCart.aspx.cs" Inherits="FShoppingCart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        <a href="Insert ShoppingCart.aspx" style="color: #FF0000">Add ShoppingCart</a>
        <asp:GridView ID="GridView1" runat="server" DataKeyNames="ShoppingID" AutoGenerateEditButton ="true" AutoGenerateColumns ="false"
     OnRowEditing ="EditRecord" OnRowCancelingEdit="CancelRecord" OnRowDeleting="DeleteRecord" OnRowUpdating="UpdateRecord">
            <HeaderStyle BackColor ="LightBlue" ForeColor="White" />
            <EditRowStyle BackColor ="Aqua" />
            <SelectedRowStyle BackColor="Cyan" />
            <Columns>
                <asp:TemplateField HeaderText="ShoppingID">
                    <ItemTemplate>
                        <%# Eval("ShoppingID")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtShoppingID" runat="server" Text='<%# Eval("ShoppingID")%>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Product ID">
                    <ItemTemplate>
                        <%# Eval("ProID")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtProID" runat="server" Text='<%# Eval("ProID")%>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Identification">
                    <ItemTemplate>
                        <%# Eval("Identification")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtIdentification" runat="server" Text='<%# Eval("Identification")%>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Quantity">
                    <ItemTemplate>
                        <%# Eval("Quantity")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtQuantity" runat="server" Text='<%# Eval("Quantity")%>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="DateShopping">
                    <ItemTemplate>
                        <%# Eval("DateShopping")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtDateShopping" runat="server" Text='<%# Eval("DateShopping")%>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="TotalPrice">
                    <ItemTemplate>
                        <%# Eval("TotalPrice")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtTotalPrice" runat="server" Text='<%# Eval("TotalPrice")%>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="status">
                    <ItemTemplate>
                        <%# Eval("status")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtstatus" runat="server" Text='<%# Eval("status")%>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete">
                    <ItemTemplate>
                        <span onclick='return confirm("Do you want to delete record?")'>
                        <asp:LinkButton ID="linkDelete" runat ="server" CommandName="Delete" Text="Delete"></asp:LinkButton>
                        </span>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:Label ID="LResult" runat="server"></asp:Label>
    </div>
</asp:Content>

